home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / boltzcmp.inh < prev    next >
Text File  |  1993-08-23  |  3KB  |  130 lines

  1. inst4.1
  2. !****************************************************************
  3. !*                                *
  4. !*    Boltzman Network Generator - Completion Model        *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckHid
  12. @Err    "Boltzmann completion model MUST have at least one input PE"
  13. :CheckHid
  14. ?&Hd1    1
  15. >bge    HidOK
  16. @Err    "Boltzmann completion model MUST have at least one hidden PE"
  17. :HidOK
  18.  
  19. !    *** Load the Control Strategy and LRS if needed
  20.  
  21. @LdCS    "boltzcmp"        !control strategy
  22. @LdLR    "boltzman"        !L/R schedule
  23.  
  24. =netn    "InstaNet (tm) Boltzmann Network (Completion Model) version 1.00 17-04-89"
  25. =DLnF    0            !learn  re-display off
  26. =DRcF    0            !recall re-display off
  27.  
  28. !    *** Build the Input Layer ***
  29.  
  30. @LLdf                !load default layer to mi_layer structure
  31. =LDln    "In"            !layer name
  32. =Lpes    &In            !copy # of input PEs from menu
  33. =Ltrn    "StepFunction"        !transfer function
  34. =x    100            !place to put layer on screen
  35. =y     50
  36. #Incl    "stdnwgtf.iif"        !standard # weight fields
  37. @LAdd                !add the input layer
  38. =n0    LayN            !track input layer
  39.  
  40. !    *** Build the Boltzmann Layer ***
  41.  
  42. @LLdf                !start with default layer again
  43. =LDln    "Boltzmann"        !layer name
  44. =Lpes    &In            !desired number of PEs
  45. +Lpes    &Hd1
  46. =Ltrn    "Boltzmann"        !transfer function
  47. =Llrn    "Boltzmann"        !learning rule
  48. =Llrs    "boltzman"        !L/R schedule
  49. =LInL    0.0            !low initialization limit
  50. =LInH    0.0            !high initialization limit
  51. +y    170            !up higher on display
  52. #Incl    "stdnwgtf.iif"        !standard # weight fields
  53. @LAdd
  54. =n1    LayN            !track Boltzmann layer
  55.  
  56. !    *** Connect input layer to Boltzmann layer ***
  57.  
  58. =SPEl    LayN            !current layer
  59. @SlPE
  60. =NPEl    n0            !input layer
  61. @NrPE
  62. =cnwt    1.0            !unit weight
  63. =cnsc    WRel
  64. =cnty    WSet
  65. @LCCr                !connect corresponding items
  66.  
  67. !    *** Connect Boltzmann layer to itself ***
  68.  
  69. =NPEl    LayN
  70. @NrPE
  71. =cnwt    0.0            !zero weights
  72. =cnty    WVar            !trainable
  73. =cnsc    WAbs
  74. @LCFl                !fully connect (except diagonal)
  75.  
  76. !    *** Connect the bias to the Boltzmann layer ***
  77.  
  78. =NPEl    -1
  79. @NrPE
  80. =cnwt    0.0            !zero weights
  81. =cnty    WVar            !trainable
  82. =cnsc    WAbs
  83. @LCFl                !fully connect (except diagonal)
  84.  
  85. !    *** Build the Output Layer ***
  86.  
  87. @LLdf                !start with default layer again
  88. =LDln    "Output"        !layer name
  89. =Lpes    &In            !desired number of PEs
  90. =Ltrn    "StepFunction"        !transfer function
  91. =LInL    0.0            !low initialization limit
  92. =LInH    0.0            !high initialization limit
  93. +y    60            !up higher on display
  94. #Incl    "stdnwgtf.iif"        !standard # weight fields
  95. @LAdd
  96. =n2    LayN            !track output layer
  97.  
  98. !    *** Connect the Boltzmann layer to the Output layer ***
  99.  
  100. =SPEl    LayN            !output layer
  101. @SlPE
  102. =NPEl    n1            !Boltzmann layer
  103. @NrPE
  104. =cnwt    1.0            !set weight to 1.0
  105. =cnty    WFix            !fixed weight
  106. =cnsc    WRel            !relative connections
  107. @LCCr                !Boltzmann to output connections
  108.  
  109. @LLsl                !load super layer
  110. =Lctl    "boltzcmp"        !control strategy
  111. =Llnn    "boltzman"        !name of learn input
  112. =Lrcn    "boltzman"        !name of recall output
  113. #Incl    "stdioset.iif"        !standard I/O settings
  114. =Lax1    Epch            !epoch size
  115. =Lax2    10            !nominal number of firings per iteration
  116. =Lax3    20            !nominal # of iterations for collecting stats
  117. +Lflg    LAAs            !auto-associative network
  118. =Lscl    -1            !input  low-value
  119. =Loff     1            !input  high-value
  120. =Llow     0            !output low-value
  121. =Lhgh     1            !output high-value
  122. @SVsl                !save it back
  123. !
  124. =jogl    -.1            !lower limit for jog
  125. =jogh    +.1            !upper limit for jog
  126. =seed    257            !starting seed number
  127. @seed                !set the seed
  128. @Nini                !initialize the network
  129. @EOF
  130.